package com.weiyuwqj.controller.user;

//import com.weiyuwqj.api.service.SysSiteMailService;
import com.weiyuwqj.api.common.Paginator;
import com.weiyuwqj.api.constant.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhangyong on 2016/11/28.
 */
@Controller
public class UserSiteMailController {
/*
    @Autowired
    SysSiteMailService sysSiteMailService;*/

   /* *//**
     * 站内信列表
     * @param request
     * @param p
     * @return
     *//*
    @ResponseBody
    @RequestMapping(value="/user/sitemail", method= RequestMethod.POST)
    public Object sitemail(HttpServletRequest request,Paginator p){
        Integer userId=(Integer)request.getSession().getAttribute("userId");
        Map map=new HashMap();
        map.put("userId",userId);
        return sysSiteMailService.getList(p,map);
    }

    *//**
     * 删除
     * @param siteMailId 站内信id
     * @return
     *//*
    @ResponseBody
    @RequestMapping(value="/user/deteleSitemail", method= RequestMethod.POST)
    public Object deteleSitemail(Integer siteMailId){
        sysSiteMailService.deletsiteMail(siteMailId);
        return Message.OK;
    }

    *//**
     * 修改状态
     * @param id
     * @return
     *//*
    @ResponseBody
    @RequestMapping(value="/user/modifyStatus")
    public Object modifyStatus(Integer id){
        return sysSiteMailService.modifyStatusById(1,0,id);
    }

    @RequestMapping(value="/user/site")
    public Object site(){
        return "main/user/message";
    }*/

//    @RequestMapping(value="/user/deteleSitemail")
}
